package com.ternnetwork.batch.listener;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.batch.core.JobExecution;
import org.springframework.batch.core.annotation.AfterJob;
import org.springframework.batch.core.annotation.BeforeJob;

public class JobLoggerListener {
	 /**日志*/
    private static final Logger logger= LoggerFactory.getLogger(JobLoggerListener.class);



    @BeforeJob
    public void beforeJob(JobExecution jobExecution){
        logger.info("job Create Time:{}",jobExecution.getCreateTime());
    }



    @AfterJob
    public void afterJob(JobExecution jobExecution){
        logger.info("job End Time:{},status:{}",jobExecution.getEndTime(),jobExecution.getStatus());
    }

}
